﻿@{
    Layout = null;
    Exception exception=(Exception)ViewData["Exception"];
    string message = "";
    if (ViewData["Exception"]!=null)
    {
        message = ViewData["Message"].ToString();
    }
}

<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>@ApplicationEnvironments.ApplicationName |  Error</title>

    <link href="~/lib_bower/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="~/lib_bower/font-awesome/css/font-awesome.min.css" rel="stylesheet">

    <link href="~/css/animate.css" rel="stylesheet">
    <link href="~/css/style.css" rel="stylesheet">

</head>

<body class="gray-bg">

    <div class="row "> 
       
            <div class="error-desc middle-box   alert alert-danger alert-dismissible fade in  " style="@(AppHttpContext.IsAjax?"max-width:100%;":"max-width:800px;")" role="alert">
                <h1  class="text-center" style="font-size:120px;">@ViewData["StatusCode"]</h1>
                <h4 class="text-center">错误信息</h4>
                <p  class="text-center">@message</p>
                <br />
                <br />
                <div  class="text-center">
                    @if (AppHttpContext.IsAjax)
                    {
                        <a class="btn btn-danger" data-dismiss="modal">关 闭</a> 
                    }
                    else
                    {
                        <a asp-action="index" asp-controller="home" asp-area="" class="btn btn-danger">返回首页</a>
                    }
                </div>
                <br />
                <br />
                <div class="text-left" >
                    @if (ApplicationEnvironments.IsDevelopment && exception != null)
                    {
                        @Html.Raw(exception.StackTrace)
                    }


                    </p>
                </div>
            </div>

       
    </div>
</body>

</html>

